package com.bubblegumproject.ogo.action;

import java.util.Map;
import java.util.HashMap;

/**
 * A generic action that is defined by some user-given name.
 * 
 * @author Azubuko Obele (buko.obele@gmail.com)
 */
public class SignalAction extends AbstractAction {

    private String name;

    private Map<String, Object> values = new HashMap<String, Object>();

    public SignalAction(String name) {
        assert(name != null);
        this.name = name;
    }

    public String getName() {
        return name;
    }

    public void set(String key, Object val) {
        assert(key != null);
        values.put(key, val);
    }

    public Object get(String key) {
        return values.get(key);
    }

    public static SignalAction Signal(String name) {
        return new SignalAction(name);
    }
}
